<template>
  <div class="detial">
    <div class="top">
      <span @click="returngo">💖</span>
      <span>专栏详情</span>
      <span> </span>
    </div>
    <div class="content">
      <h2 v-html="list.title"></h2>
      <img :src="list.pic" alt="" />
      <p v-html="list.content"></p>
    </div>
  </div>
</template>

<script>
import { getSpecialDetial } from "../../utils/api";
export default {
  data() {
    return {
      list: "",
    };
  },
  mounted() {
    let id = this.$route.query.id;
    getSpecialDetial(id).then((res) => {
      this.list = res.data;
    });
  },
  methods: {
    //返回
    returngo() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
.top {
  display: flex;
  justify-content: space-around;
  font-size: 0.35rem;
  height: 1rem;
  line-height: 1rem;
  border-bottom: 1px solid #cccccc;
}
.content {
  width: 100%;
  height: 15.2rem;
  overflow: auto;
  h2 {
    padding-top: 0.8rem;
    margin: auto;
    margin-top: 0.1rem;
    display: block;
    text-align: center;
  }
  img {
    width: 7rem;
    height: 4rem;
    display: block;
    margin: 0.2rem auto;
  }
  p {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.35rem;
  }
}
</style>
